package com.nonsense.textsummary

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Text
import androidx.compose.ui.Modifier
import androidx.core.view.ScrollingView
import androidx.core.view.WindowCompat
import com.nonsense.textsummary.ui.theme.TextSummaryTheme


class MainActivity : ComponentActivity() {

    @OptIn(ExperimentalMaterial3Api::class)
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        WindowCompat.setDecorFitsSystemWindows(window, false)
        setContent {
            TextSummaryTheme {
                FullScreenScaffold(topBar = {
                    CenterAlignedTopAppBar(
                        { Text("中文新闻摘要生成") }
                    )
                }) {
                    Box(modifier = Modifier.padding(it)) {
                        TextSummary()
                    }
                }
            }
        }
    }

}
